import request from '@/utils/request'

/** 银行管理 */
export function bankList(query = {}) {
    return request({
        url: '/api/admin/platform/bankCard/list',
        method: 'post',
        data: query
    })
}

export function bankAdd(data) {
    return request({
        url: '/api/admin/platform/bankCard/add',
        method: 'post',
        data
    })
}

export function bankEdit(data) {
    return request({
        url: '/api/admin/platform/bankCard/edit',
        method: 'post',
        data
    })
}

export function bankDelete(data) {
    return request({
        url: '/api/admin/platform/bankCard/delete',
        method: 'post',
        data
    })
}

export function bankDetail(query) {
    return request({
        url: '/api/admin/platform/bankCard/detail',
        method: 'get',
        params: query
    })
}

export function bankChangeStatus(data) {
    return request({
        // /admin/platform/bankCard/updateStatus/{bankCardId}/{useStatus}
        url: '/api/admin/platform/bankCard/updateStatus/' + data.bankCardId + '/' + data.useStatus,
        method: 'put',
        data
    })
}
